package com.application.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class MyException {
	@ExceptionHandler(Exception.class)
	public @ResponseBody String handlerException(Exception e){
		System.err.println(e.getMessage());
		return "error:"+e.getMessage();
	}
}
